package binlog_consume.instance.core;

import data_propagate.meta.MetaManager;
import drds.data_propagate.common.LifeCycle;
import drds.data_propagate.common.alarm.AlarmHandler;
import drds.data_propagate.parse.EventParser;
import drds.data_propagate.sink.EventSink;
import drds.data_propagate.store.EventStore;
import drds.propagate.protocol.ClientId;

/**
 * 代表单个canal实例，比如一个destination会独立一个实例
 *
 * @author jianghang 2012-7-12 下午12:04:58
 * @version 1.0.0
 */
public interface Instance extends LifeCycle {

    String getDestination();

    EventParser getEventParser();

    EventSink getEventSink();

    EventStore getEventStore();

    MetaManager getMetaManager();

    AlarmHandler getAlarmHandler();

    /**
     * 客户端发生订阅/取消订阅行为
     */
    boolean subscribeChange(ClientId identity);

    CanalMQConfig getMqConfig();
}
